package com.ces.knacky.model;

import java.io.Serializable;
import java.util.Set;

import org.apache.commons.lang.builder.EqualsBuilder;

import com.ces.knacky.framework.model.AbstractParentEntity;

/** @author Hibernate CodeGenerator */
public class RoleTable extends AbstractParentEntity implements Serializable {
    /** persistent field */
    private Set userRoles;

    /** full constructor */
    public RoleTable(String description, Set userRoles) {
        this.description = description;
        this.userRoles = userRoles;
    }

    /** default constructor */
    public RoleTable() {
    }

    public String getDescription() {
        return this.description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Set getUserRoles() {
        return this.userRoles;
    }

    public void setUserRoles(Set userRoles) {
        this.userRoles = userRoles;
    }

    public boolean equals(Object other) {
        if ( !(other instanceof RoleTable) ) return false;
        RoleTable castOther = (RoleTable) other;
        return new EqualsBuilder()
            .append(this.getId(), castOther.getId())
            .isEquals();
    }

}
